package com.ttg.common.enums;


import lombok.Getter;

@Getter
public enum MerchantTradeTypeEnum {
    /**
     * 101 交易金额
     * 201 手续费金额
     * 301 补贴金额
     * 102 交易笔数
     * 103 交易天数
     */
    TRADE_NUMBER(1,"交易笔数"),
    TRADE_AMOUNT(2,"交易金额"),
    HANDING_FEE_AMOUNT(3,"手续费金额"),
    SUBSIDIES_AMOUNT(4,"补贴金额"),
    TRADE_DAY(5,"交易天数");


    private Integer code;

    private String dec;

    MerchantTradeTypeEnum(Integer code, String dec) {
        this.code = code;
        this.dec = dec;
    }

    public static MerchantTradeTypeEnum getByDec(String dec){
        for (MerchantTradeTypeEnum value : values()) {
            if (value.dec.equals(dec)){return value;}
        }
        return null;
    }
}
